<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="eg" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>기능목록</title>
<LINK href="/monitor/css/basic.css" rel="stylesheet" type="text/css">
<script src="/monitor/jquery-ui-1.10.1.custom/js/jquery-1.9.1.js" type="text/javascript" ></script>
<script src="/monitor/js/basic.js" type="text/javascript" ></script>
</head>
<body>
<c:if test="${!empty param.PARAM_FUNCTION_ID}">
   <c:set var="where1" value="AND FUNCTION_ID like '%${param.PARAM_FUNCTION_ID}%'" />			
</c:if>
<c:if test="${!empty param.PARAM_FUNCTION_ID}">
   <c:set var="where2" value="AND SCREEN_ID IN (SELECT SCREEN_ID FROM AP_SCREEN_FUNCTION WHERE FUNCTION_ID = '${param.PARAM_FUNCTION_ID}')" />			
</c:if>
<c:if test="${!empty param.PARAM_FUNCTION_ID}">
   <c:set var="where3" value="AND SERVICE_ID IN (SELECT SERVICE_ID FROM AP_FUNCTION WHERE FUNCTION_ID = '${param.PARAM_FUNCTION_ID}')" />			
</c:if>
<sql:query var='test' dataSource="basisDataSource">
	SELECT * 
	 FROM AP_SCREEN_FUNCTION
	WHERE 1 = 1
	  AND ROWNUM < 100
	 ${where1}
 </sql:query>	
 <sql:query var='test2' dataSource="basisDataSource">
	SELECT * 
	 FROM AP_SCREEN
	WHERE 1 = 1
	  AND ROWNUM < 100
	 ${where2}
 </sql:query>	
  <sql:query var='test3' dataSource="basisDataSource">
	SELECT * 
	 FROM AP_SERVICE
	WHERE 1 = 1
	  AND ROWNUM < 100
	 ${where3}
 </sql:query>	
<h3>기능목록</h3>
 <form method="post">
	<table>
		<tr>
			<td>FUNCTION_ID</td>
			<td><input name="PARAM_FUNCTION_ID" value="${param.PARAM_FUNCTION_ID}"></td>
		</tr>
	</table>
	<input type="submit" />
</form>
<br/>
<h3>AP_SERVICE</h3>
<table border="1">
	<tr>
			<td class="header">SERVICE_ID</td>
			<td class="header">SERVICE_NAME</td>
			<td class="header">SERVICE_TYPE</td>
			<td class="header">DESCRIPTION</td>
			<td class="header">CALL_TYPE</td>
			<td class="header">PROJECT_CODE</td>
			<td class="header">CATEGORY_CODE</td>
			<td class="header">CLASS_NAME</td>
			<td class="header">METHOD_NAME</td>
			<td class="header">REG_USER_ID</td>
			<td class="header">REG_DATETIME</td>
			<td class="header">UPD_USER_ID</td>
			<td class="header">UPD_DATETIME</td>
			<td class="header">PAGING_YN</td>
			<td class="header">FIND_COND_SAVE_YN</td>
			<td class="header">PAGING_COUNT</td>
			<td class="header">IS_PROTECTED_RESOURCE</td>
			<td class="header">HAS_LINKED_FILE</td>
			<td class="header">IS_INDUCED_EVENT</td>
			<td class="header">LINKED_WORK_CATEGORY</td>
			<td class="header">LINKED_ACTIVITY_TYPE</td>
			<td class="header">IS_WORKFLOW_CREATION</td>
			<td class="header">WORKFLOW_EXEC_LOCATION</td>
			<td class="header">WORKFLOW_BIZ_TYPE</td>
			<td class="header">WORKFLOW_ACTIVITY</td>
			<td class="header">IS_WORKFLOW_TRIGGER</td>
			<td class="header">WORKFLOW_EVENT_NAME</td>
			<td class="header">WORKFLOW_DETAIL_BIZ_TYPE</td>
			<td class="header">ENCRYPT_COLUMNS</td>
		</tr>
	<tr>
			<td class="header">서비스ID</td>
			<td class="header">서비스명</td>
			<td class="header">서비스유형</td>
			<td class="header">설명</td>
			<td class="header">호출유형</td>
			<td class="header">프로젝트코드</td>
			<td class="header">분류코드</td>
			<td class="header">클래스명</td>
			<td class="header">메소드명</td>
			<td class="header">등록사용자ID</td>
			<td class="header">등록일시</td>
			<td class="header">수정사용자ID</td>
			<td class="header">수정일시</td>
			<td class="header">페이징여부</td>
			<td class="header">검색조건저장여부</td>
			<td class="header">페이징수</td>
			<td class="header">보호된자원여부</td>
			<td class="header">첨부파일지원여부</td>
			<td class="header">이벤트유발여부</td>
			<td class="header">연결된업무구분</td>
			<td class="header">연결된업무활동유형</td>
			<td class="header">워크플로우생성여부</td>
			<td class="header">워크플로우실행위치</td>
			<td class="header">워크플로우업무유형</td>
			<td class="header">워크플로우활동</td>
			<td class="header">워크플로우이벤트발생여부</td>
			<td class="header">워크플로우이벤트명</td>
			<td class="header">워크플로우상세업무유형</td>
			<td class="header">암호화대상컬럼</td>
		</tr>
	<c:forEach var="row" items="${test3.rows}">
	<tr onclick="setLineBGColor(this)">
			<td>${row.SERVICE_ID}</td>
			<td>${row.SERVICE_NAME}</td>
			<td>${row.SERVICE_TYPE}</td>
			<td>${row.DESCRIPTION}</td>
			<td>${row.CALL_TYPE}</td>
			<td>${row.PROJECT_CODE}</td>
			<td>${row.CATEGORY_CODE}</td>
			<td>${row.CLASS_NAME}</td>
			<td>${row.METHOD_NAME}</td>
			<td>${row.REG_USER_ID}</td>
			<td><fmt:formatDate value="${row.REG_DATETIME.timestampValue()}" pattern="yyyy-MM-dd HH:mm" /> </td>
			<td>${row.UPD_USER_ID}</td>
			<td><fmt:formatDate value="${row.UPD_DATETIME.timestampValue()}" pattern="yyyy-MM-dd HH:mm" /> </td>
			<td>${row.PAGING_YN}</td>
			<td>${row.FIND_COND_SAVE_YN}</td>
			<td>${row.PAGING_COUNT}</td>
			<td>${row.IS_PROTECTED_RESOURCE}</td>
			<td>${row.HAS_LINKED_FILE}</td>
			<td>${row.IS_INDUCED_EVENT}</td>
			<td>${row.LINKED_WORK_CATEGORY}</td>
			<td>${row.LINKED_ACTIVITY_TYPE}</td>
			<td>${row.IS_WORKFLOW_CREATION}</td>
			<td>${row.WORKFLOW_EXEC_LOCATION}</td>
			<td>${row.WORKFLOW_BIZ_TYPE}</td>
			<td>${row.WORKFLOW_ACTIVITY}</td>
			<td>${row.IS_WORKFLOW_TRIGGER}</td>
			<td>${row.WORKFLOW_EVENT_NAME}</td>
			<td>${row.WORKFLOW_DETAIL_BIZ_TYPE}</td>
			<td>${row.ENCRYPT_COLUMNS}</td>
		</tr>
	</c:forEach>
</table>
<h3>AP_SCREEN_FUNCTION</h3>
<table border="1">
	<tr>
			<td class="header">SCREEN_ID</td>
			<td class="header">FUNCTION_ID</td>
			<td class="header">START_FUNCTION_YN</td>
			<td class="header">REG_USER_ID</td>
			<td class="header">REG_DATETIME</td>
			<td class="header">UPD_USER_ID</td>
			<td class="header">UPD_DATETIME</td>
			<td class="header">FUNCTION_ALIAS_ID</td>
		</tr>
	<tr>
			<td class="header">화면ID</td>
			<td class="header">기능ID</td>
			<td class="header">시작기능여부</td>
			<td class="header">등록사용자ID</td>
			<td class="header">등록일시</td>
			<td class="header">수정사용자ID</td>
			<td class="header">수정일시</td>
			<td class="header">기능별명ID</td>
		</tr>
	<c:forEach var="row" items="${test.rows}">
	<tr onclick="setLineBGColor(this)">
			<td>${row.SCREEN_ID}</td>
			<td>${row.FUNCTION_ID}</td>
			<td>${row.START_FUNCTION_YN}</td>
			<td>${row.REG_USER_ID}</td>
			<td><fmt:formatDate value="${row.REG_DATETIME.timestampValue()}" pattern="yyyy-MM-dd HH:mm" /> </td>
			<td>${row.UPD_USER_ID}</td>
			<td><fmt:formatDate value="${row.UPD_DATETIME.timestampValue()}" pattern="yyyy-MM-dd HH:mm" /> </td>
			<td>${row.FUNCTION_ALIAS_ID}</td>
		</tr>
	</c:forEach>
</table>

<h3>AP_SCREEN</h3>
<table border="1">
	<tr>
			<td class="header">SCREEN_ID</td>
			<td class="header">PROJECT_CODE</td>
			<td class="header">CATEGORY_CODE</td>
			<td class="header">SCREEN_TYPE</td>
			<td class="header">VIEW_TYPE</td>
			<td class="header">SCREEN_NAME</td>
			<td class="header">DESCRIPTION</td>
			<td class="header">FILE_PATH</td>
			<td class="header">FILE_NAME</td>
			<td class="header">SERVICE_ID</td>
			<td class="header">REG_DATETIME</td>
			<td class="header">REG_USER_ID</td>
			<td class="header">UPD_DATETIME</td>
			<td class="header">UPD_USER_ID</td>
			<td class="header">PID</td>
			<td class="header">LAYOUT_TYPE</td>
		</tr>
	<tr>
			<td class="header">화면ID</td>
			<td class="header">프로젝트코드</td>
			<td class="header">분류코드</td>
			<td class="header">화면유형</td>
			<td class="header">VIEW유형</td>
			<td class="header">화면명</td>
			<td class="header">설명</td>
			<td class="header">파일경로</td>
			<td class="header">파일명</td>
			<td class="header">서비스ID</td>
			<td class="header">등록일시</td>
			<td class="header">등록사용자ID</td>
			<td class="header">수정일시</td>
			<td class="header">수정사용자ID</td>
			<td class="header">메타 페이지 ID</td>
			<td class="header">레이아웃유형</td>
		</tr>
	<c:forEach var="row" items="${test2.rows}">
	<tr onclick="setLineBGColor(this)">
			<td>${row.SCREEN_ID}</td>
			<td>${row.PROJECT_CODE}</td>
			<td>${row.CATEGORY_CODE}</td>
			<td>${row.SCREEN_TYPE}</td>
			<td>${row.VIEW_TYPE}</td>
			<td>${row.SCREEN_NAME}</td>
			<td>${row.DESCRIPTION}</td>
			<td>${row.FILE_PATH}</td>
			<td>${row.FILE_NAME}</td>
			<td>${row.SERVICE_ID}</td>
			<td><fmt:formatDate value="${row.REG_DATETIME.timestampValue()}" pattern="yyyy-MM-dd HH:mm" /> </td>
			<td>${row.REG_USER_ID}</td>
			<td><fmt:formatDate value="${row.UPD_DATETIME.timestampValue()}" pattern="yyyy-MM-dd HH:mm" /> </td>
			<td>${row.UPD_USER_ID}</td>
			<td>${row.PID}</td>
			<td>${row.LAYOUT_TYPE}</td>
		</tr>
	</c:forEach>
</table>

</body>
</html> 